<?php
class Application_Form_Post extends Zend_Form
{
	public function init()
	{
		$this->setMethod(self::METHOD_POST);
		//add the various form elements
		//TODO add more validators
		$this->addElement('text', 'title', array(
            'label'      => 'Title:',
            'required'   => true,
            'validators' => array(
                array('validator' => 'StringLength', 'options' => array(0, 50))
                )
        ));
        $this->addElement('textarea', 'text', array(
            'label'      => 'Text:',
            'required'   => true,
        	'rows' => 5,
        ));
        $this->addElement('submit', 'submit', array(
            'ignore'   => true,
            'label'    => 'Publish',
        ));
        $this->addElement('hash', 'csrf', array(
            'ignore' => true,
        ));
	}
}